﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using _MetalSlug.MyCharacters.Characters;
using _MetalSlug.Weapons.Units;
using _MetalSlug.Weapons.Factory;
using _MetalSlug.Mission;

namespace _MetalSlug.Soldiers.Units
{
    public class MiniGunSoldier : Enemy
    {
        public override void LoadContent()
        {         
            DieTexture2Ds = GameUtil.LoadTextures("Solider/die",11);
            StandTexture2Ds = GameUtil.LoadTextures("Solider/MiniGun/stand",2);
            ShotTexture2Ds = GameUtil.LoadTextures("Solider/MiniGun/shot",9);
            RunTexture2Ds = GameUtil.LoadTextures("Solider/MiniGun/run",5);

        }
        public MiniGunSoldier(Vector2 topleft, Vector2 size)
        {
            InitialAttribute(topleft, size);
            Hp = 40;
            Type = TYPE_SOLDIER.MINIGUN_SOLDIER;
            DistanceChase = new Segment { Min= 350, Max=400 };
            DistanceShoot = new Segment { Min = 0, Max = 350 };
            DistanceFlip = 60;
        }

        public MiniGunSoldier(int ID)
        {
            // TODO: Complete member initialization
            id = ID;    
        }

        protected override void Shoot()
        {
            Bullet bullet = BulletStore.GetInstance().Produce(Bullet.TYPE_BULLET.MINIGUN_BULLET);
            bullet.Fire(TopLeft, CharDirection);
            Bullets.Add(bullet);
        }

        public override Enemy Clone(int ID, Vector2 topleft)
        {
            Enemy enemy = new MiniGunSoldier(ID);
            enemy.Copy(this, topleft);
            return enemy;
        }

    }
}

